// MoveJig.h: interface for the MoveJig class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_MOVEJIG_H__F7CBC4F3_FBB8_4513_93A5_509B50ACCCFA__INCLUDED_)
#define AFX_MOVEJIG_H__F7CBC4F3_FBB8_4513_93A5_509B50ACCCFA__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <dbjig.h>
#include <dbsol3d.h>
#include <gemat3d.h>
#include "GeometryEditor.h"
#include "DlgChangeMoveBasePoint.h"

using namespace UeGeometryEdit;
namespace EntityJig
{
	class DllExport MoveJig : public AcEdJig  
	{
		friend class CDlgChangeMoveBasePoint;
		typedef UeGeometryEdit::MoveEditor<AcDbEntity> EntityMoveEditor;
	public:
		MoveJig(AcDbEntity* pEntity, AcGePoint3dArray& PointArray);
		virtual ~MoveJig();
		
	public:
		BOOL dolt();
		virtual AcDbEntity* entity() const;
		virtual Adesk::Boolean update();
		virtual AcEdJig::DragStatus sampler();
		Acad::ErrorStatus transformOsnapBy();
		const AcGePoint3d& Basepoint(){
			return m_ptBase;
		}
		const AcGePoint3d& JointPoint(){
			return m_MousePoint;
		}

		INT CurJointPointNum(){
			return m_nCurSerialNumber;
		}

		const AcGeMatrix3d& TransMatrix() const {
			return m_Editor.TransMatrix();
		}
	public:
		void SetToNextConnectPoint();
		void SetToPrevConnectPoint();
		
	private:
		void ShowChangeWindow();
		void DestoryChangeWindow();
			
	private:
		AcGePoint3dArray& m_OsnapPtArray;
		AcDbEntity* m_pEntity;
		EntityMoveEditor m_Editor;
		AcGePoint3d m_MousePoint;
		AcGePoint3d m_LastPoint;
		AcGeMatrix3d m_matrix;
		CDlgChangeMoveBasePoint m_ChangePointDlg;
		INT m_nCurSerialNumber;
		AcGePoint3d m_ptBase;
	};
}
#endif // !defined(AFX_MOVEJIG_H__F7CBC4F3_FBB8_4513_93A5_509B50ACCCFA__INCLUDED_)
